﻿@using AmorCanino.Web.Models.Authentication
@{
    var isAuthenticated = AuthUser.Current() != null;
}

@if (!isAuthenticated)
{
    <div class="newUserLogIn">
        <h1>Regístrarte</h1>
        @using (Html.BeginForm("register", "account", FormMethod.Get))
        {
            <div class="table">
                <div class="row">
                    <div class="cell" style="width:60px; text-align: right;"><span>Nombre:</span></div><div class="cell"><input type="text" name="Name" /></div>
                </div>
                <div class="row">
                    <div class="cell" style="width:60px; text-align: right;"><span>Email:</span></div><div class="cell"><input type="text" name="Email" /></div>
                </div>
                <div class="row">
                    <div class="cell" style="width:60px;">&nbsp;</div>
                    <div class="cell">
                        <div style="float:left; margin-right: 10px;">
                            <div class="InvertedActionButton" data-autosubmit="true">Regístrate</div>
                        </div> <a href="#" class="AlreadyUserLink">Ya soy usuario</a>
                    </div>
                </div>
            </div>
        }
    </div>
    <div class="existingUserLogIn">
        <h1>Ingresar</h1>
        @using (Html.BeginForm("logon","account"))
        {
            <div class="table">
                <div class="row">
                    <div class="cell" style="width:60px; text-align: right;"><span>Email:</span></div><div class="cell"><input type="text" name="Email" /></div>
                </div>
                <div class="row">
                    <div class="cell" style="width:60px; text-align: right;"><span>Contraseña:</span></div><div class="cell"><input type="password" name="Password" /></div>
                </div>
                <div class="row">
                    <div class="cell" style="width:60px;">&nbsp;</div>
                    <div class="cell">
                        <div style="float:left; margin-right: 10px;"><div class="InvertedActionButton" data-autosubmit="true">Ingresar</div></div> 
                        <a href="#" class="NewUserLink">Nuevo usuario</a>
                    </div>
                </div>
            </div>
            <input type="hidden" name="ReturnUrl" value="@Request.Url.ToString()" />
        }
    </div>
}